﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>查询会员等级</title>
    <meta charset="utf-8" />
    <link href="../jquery-easyui-1.4.3/themes/default/easyui.css" rel="stylesheet" />
    <link href="../jquery-easyui-1.4.3/themes/icon.css" rel="stylesheet" />
    <script src="../jquery-easyui-1.4.3/jquery.min.js"></script>
    <script src="../jquery-easyui-1.4.3/jquery.easyui.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $(".Insert").click(function () {;
                $("#dlg").dialog({ width: 500, height: 500 }).dialog("setTitle", "新增会员卡类别").dialog("open");
                $("#frm1").attr("src", "/SystemManage/AddMember.html");
            });
            $(".Delete").click(function () {
                var row = $("#dg").datagrid("getSelected");
                if (row != null) {
                    $("#dlg").dialog({ width: 500, height: 500 }).dialog("setTitle", "删除用户").dialog("open");
                    $("#frm1").attr("src", "UserDelete");
                } else {
                    $.messager.confirm("温馨提示", "您确定要删除选中的信息吗？", $.extend($.messager.defaults, {
                        ok: "确定",
                        cancel: "取消"
                    }));
                }
            });
            $(".Update").click(function () {
                var row = $("#dg").datagrid("getSelected");
                if (row != null) {
                    $("#dlg").dialog({ width: 500, height: 500 }).dialog("setTitle", "修改会员卡类别").dialog("open");
                    $("#frm1").attr("src", "/SystemManage/EditMember.html");
                } else {
                    $.messager.alert("提示", "请选择需要编辑的行", "warning");
                }
            });
            $(".Search").click(function () {
                $("#dlg").dialog({ width: 500, height: 500 }).dialog("setTitle", "查询用户").dialog("open");
                $("#frm1").attr("src", "UserSearch");
            });
            $("#dg").datagrid({
                fitColumns: true,
                toolbar: "#tb",//工具栏
                pagination: true,//分页
                singleSelect: true,//选择行（单选）
                rownumbers: true,//序列号（行）
                method:"get",//决定请求方式get或post
                url: "/jquery-easyui-1.4.3/demo/datagrid/datagrid_data1.json",
                columns: [[
                    { field: 'productid', title: '等级编号', width: 80 },
                    { field: 'productname', title: '等级名称', width: 80 },
                    { field: 'unitcost', title: '所需最大积分', width: 80, align: 'right' }
                ]]
            });
        });
    </script>
</head>
<body>
    <div id="tb" style="padding:5px;height:auto">
        <div style="margin-bottom:5px">
            <a id="btn" href="#" class="easyui-linkbutton Insert" data-options="iconCls:'icon-add'">新增</a>
            <a id="btn" href="#" class="easyui-linkbutton Update" data-options="iconCls:'icon-edit'">修改</a>
            <a id="btn" href="#" class="easyui-linkbutton Delete" data-options="iconCls:'icon-remove'">删除</a>
        </div>
        <div>
            等级名称：<input id="txtU_Telephone" type="text" />
            <a id="btn" href="#" class="easyui-linkbutton Search" data-options="iconCls:'icon-search'">查询</a>
        </div>
    </div>
    <table id="dg"></table>
    <div id="dlg" class="easyui-dialog" data-options="iconCls:'icon-save',resizable:true,modal:true,closed:true">
        <iframe id="frm1" width="99%" height="99%" frameborder="0"></iframe>
    </div>
</body>
</html>
